package com.sinosoft.user.service.impl;

import java.util.List;
import com.sinosoft.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sinosoft.user.mapper.TestFlowMapper;
import com.sinosoft.user.domain.TestFlow;
import com.sinosoft.user.service.ITestFlowService;

/**
 * 流程验证Service业务层处理
 *
 * @author sinosoft
 * @date 2022-02-22
 */
@Service
public class TestFlowServiceImpl implements ITestFlowService
{
    @Autowired
    private TestFlowMapper testFlowMapper;

    /**
     * 查询流程验证
     *
     * @param id 流程验证ID
     * @return 流程验证
     */
    @Override
    public TestFlow selectTestFlowById(Long id)
    {
        return testFlowMapper.selectTestFlowById(id);
    }

    /**
     * 查询流程验证列表
     *
     * @param testFlow 流程验证
     * @return 流程验证
     */
    @Override
    public List<TestFlow> selectTestFlowList(TestFlow testFlow)
    {
        return testFlowMapper.selectTestFlowList(testFlow);
    }

    /**
     * 新增流程验证
     *
     * @param testFlow 流程验证
     * @return 结果
     */
    @Override
    public int insertTestFlow(TestFlow testFlow)
    {
        testFlow.setCreateTime(DateUtils.getNowDate());
        return testFlowMapper.insertTestFlow(testFlow);
    }

    /**
     * 修改流程验证
     *
     * @param testFlow 流程验证
     * @return 结果
     */
    @Override
    public int updateTestFlow(TestFlow testFlow)
    {
        return testFlowMapper.updateTestFlow(testFlow);
    }

    /**
     * 批量删除流程验证
     *
     * @param ids 需要删除的流程验证ID
     * @return 结果
     */
    @Override
    public int deleteTestFlowByIds(Long[] ids)
    {
        return testFlowMapper.deleteTestFlowByIds(ids);
    }

    /**
     * 删除流程验证信息
     *
     * @param id 流程验证ID
     * @return 结果
     */
    @Override
    public int deleteTestFlowById(Long id)
    {
        return testFlowMapper.deleteTestFlowById(id);
    }
}
